Ext.onReady(function(){
    // shorthand
    var Tree = Ext.tree;
   
    var tree = new Tree.TreePanel({
       
        autoScroll:true,
        animate:true,
        enableDD:true,
        containerScroll: true,
        loader: new Tree.TreeLoader({
            dataUrl:'<s:url namespace="/function" action="list!getSF.action"/>'
        })
    });

    // set the root node
    var root = new Tree.AsyncTreeNode({
        text: 'tree',
        draggable:false,
        id:'id'
    });
    tree.setRootNode(root);

    // render the tree
    tree.render();
    root.expand();
});